<template>
  <view>
    <view>
      属性形式获取usernameLen：{{usernameLen}}
    </view>
    <view>
      方法形式获取username：{{username}}
    </view>
  </view>
</template>

<script lang="ts">
import Vue from 'vue'
export default Vue.extend({
  computed: {
    usernameLen(){
      return this.$store.getters.usernamelen
    },
    username(){
      return this.$store.getters.getByAttrName('username');
    }
  }
})
</script>

<style scoped>

</style>
